{% extends "common/layout_main.html" %}
{% block content %}
    {% include 'common/tab_member.html' %}
    <div class="row">
        <div class="col-lg-12">
            <form class="form-inline wrap_search">
                {% include 'common/search_user.html' %}
                <hr>
            </form>
            <table class="table table-bordered m-t">
                <thead>
                <tr>
                    <th>头像</th>
                    <th>姓名</th>
                    <th>性别</th>
                    <th>状态</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                {% if pagination.items %}
                    {% for member in pagination.items %}
                        <tr>
                            <td><img alt="image" class="img-circle" src="{{ member.avatar }}"
                                     style="width: 40px;height: 40px;"></td>
                            <td>{{ member.nickname }}</td>
                            <td>{{ member.sex_desc }}</td>
                            <td>{{ member.status_desc }}</td>
                            <td>
                                {% if member.status == 1 %}
                                    <a href="{{ buildUrl('/member/info') }}?id={{ member.id }}">
                                        <i class="fa fa-eye fa-lg"></i>
                                    </a>
                                    <a class="m-l" href="{{ buildUrl('/member/set') }}?id={{ member.id }}">
                                        <i class="fa fa-edit fa-lg"></i>
                                    </a>
                                {% endif %}
                                {% if member.status==1 %}
                                    <a class="m-l remove" href="javascript:void(0);" data={{ member.id }}>
                                        <i class="fa fa-trash fa-lg"></i>
                                    </a>
                                {% else %}
                                    <a class="m-l recover" href="javascript:void(0);" data={{ member.id }}>
                                        <i class="fa fa-refresh fa-lg"></i>
                                    </a>
                                {% endif %}
                            </td>
                        </tr>
                    {% endfor %}
                {% else %}
                    <tr>
                        <td colspan="5">暂无信息</td>
                    </tr>
                {% endif %}
                </tbody>
            </table>
            <!--分页代码已被封装到统一模板文件中-->
            {% include 'common/pagenation.html' %}
        </div>
    </div>
{% endblock %}
{% block js %}
    <script src="{{ buildStaticUrl('/js/member/index.js') }}"></script>
{% endblock %}
